/*************************************************************************
	> File Name: Adapter.cc
	> Author: Joker
	> Mail: mahongtao@foxmail.com 
	> Created Time: 2020-09-21 22:11:40
 ************************************************************************/

#include "Adapter.h"

#include <iostream>
 
using std::cout;
using std::endl;

void Adaptee::SpecialRequest(){
    cout << "SpecialRequest of Adaptee" << endl;
}

Adapter::Adapter(Adaptee * pAdaptee)
    :_pAdaptee(pAdaptee)
{
    cout << "Adapter(Adaptee *)" << endl;
}

Adapter::~Adapter(){
    cout << "~Adapter()" << endl;
    delete _pAdaptee;
    _pAdaptee = nullptr;
}

void Adapter::Request(){
    cout << "Request of Adapter" << endl;
    _pAdaptee->SpecialRequest();
}
